class Solution(object):
    def decompressRLElist(self, nums):
        """
        :type nums: List[int]
        :rtype: List[int]
        """
        out = []
        for i in range(len(nums) // 2):
            out += [nums[2 * i + 1]] * nums[2 * i]
        return out


data = Solution()
nums = [1, 2, 3, 4]
print(data.decompressRLElist(nums))
